/*
 * ? 2004/5/11 ?create
 *
 */
package jaoso.framework.dao;

import java.io.Serializable;

/**
 * @author chen_jian
 */
public interface BaseDAO extends DAO
{
    /**
     * DOCUMENT ME!
     * 
     * @param query
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    Object[] findEntity(MyQuery query);

    /**
     * DOCUMENT ME!
     * 
     * @param query
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    Object[] findEntity(String query);

    /**
     * DOCUMENT ME!
     * 
     * @param obj
     *            DOCUMENT ME!
     * @param id
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    Object loadEntity(Object obj, Serializable id);

    /**
     * DOCUMENT ME!
     * 
     * @param clasz
     *            DOCUMENT ME!
     * @param id
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    Object loadEntity(Class clasz, Serializable id);

    /**
     * DOCUMENT ME!
     * 
     * @param obj
     *            DOCUMENT ME!
     */
    void removeEntity(Object obj);

    /**
     * DOCUMENT ME!
     * 
     * @param obj
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     *  
     */
    Object saveEntity(Object obj);

    /**
     * DOCUMENT ME!
     * 
     * @param obj
     *            DOCUMENT ME!
     * 
     * @return DOCUMENT ME!
     */
    Object updateEntity(Object obj);
}